
<section id="content" class="bg-white">
        <div class="page-title clearfix hidden-print">
            <button class="btn btn-sm btn-info pull-right" onclick="window.print();">Print</button>
            <span class="h3">Email Detail</span>
        </div>
	        <section class="padder m-t">
	            <div class="well m-t">
	                <div class="row">
	                    
	                	<strong class='col-xs-2'>Email title:</strong>
	                    <h4 class='col-xs-10'><?php echo h($email['Email']['title']); ?></h4>

	                </div>

	                <div class='row'>
	                		<strong class="col-xs-2">Email content:</strong>
	                        
	                        <h5 class='col-xs-10'>
	                        	<p>
	                        		<?php echo h($email['Email']['content']); ?>
	                        	</p>
	                        </h5>
	                </div>
	            </div>
            <p class="m-t m-b">Sent date: <strong><?php echo h($email['Email']['created']); ?></strong><br>
            <div class="line"></div>

            <table class="table" width="300">
                <thead>
                    <tr>
                        <th width="250">Sent to groups</th>
                    </tr>
                </thead>
                <tbody>
                	<tr>
                        <?php
                // pr($sendtogroup);die();
                $arr=array();
                foreach ($sendtogroup as $k => $v) {
                    $arr[]=$v['Customer']['Group']['id'];
                    $count=0;
                    foreach ($arr as $key => $value) {
                        if($value == $v['Customer']['group_id']){ $count++;}
                    }
                    if($count==1){
                        ?>
                        <?php
                    }
                }
                ?>
                		<td>
                            <div class='form-group'>
                                <label class='col-lg-2'><?php echo $v['Customer']['Group']['name']; ?></label>
                                <a href="#modal" data-toggle="modal" id="viewlistcustomeringroup" class="viewlistcustomeringroup col-lg-6" rel="<?php echo $v['Customer']['group_id'];?>" name="<?php echo $v['CustomersEmail']['email_id']; ?>" title="Xem danh sách các thành viên đã được gửi email trong <?php echo $v['Customer']['Group']['name']; ?>">View Detail</a>
                            </div>
                		  	
                		</td>
                	</tr>
                </tbody>
            </table>
        </section>
    </section>





